# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-deepdiff
pkgver=6.3.1
pkgrel=1
pkgdesc="Deep Difference and Search of any Python object/data."
url="https://github.com/seperman/deepdiff"
license=('MIT')
arch=('any')
depends=('python-ordered-set')
optdepends=('python-click: for cli'
            'python-tomli-w: for cli'
            'python-yaml: for YAML support'
            'python-clevercsv: for more rubust CSV parsing'
            'python-orjson: for speed and memory optimized parsing')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-clevercsv' 'python-click' 'python-dateutil'
              'python-jsonpickle' 'python-numpy' 'python-tomli-w' 'python-yaml' 'python-orjson')
source=("https://github.com/seperman/deepdiff/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('dfe2d39a6cf6e5b07da1ad27ec8c61335baaa10f99f938364c444ccd84818c890bdbaf89f63e1e79a2b9ba478395e38f39aa87761e986d57bfe7eb19424f0dd7')

build() {
  cd deepdiff-$pkgver
  python setup.py build
}

check() {
  cd deepdiff-$pkgver
  pytest tests
}

package() {
  cd deepdiff-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
